package com.zimin.cloud.user.api;

import com.zimin.cloud.mine.pojo.user.business.UserBO;
import com.zimin.shared.pojo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

/**
 * @author zimin
 */
@FeignClient(name = IBaseUserFeign.SERVER_NAME)
public interface IUserFeign {

    String URL_PREFIX = "/user";

    @GetMapping(value = URL_PREFIX + "/users")
    Result userList(@SpringQueryMap UserBO userBO);

    @PostMapping(URL_PREFIX)
    Result saveUser(@RequestBody UserBO userBO);

    @PutMapping(URL_PREFIX)
    Result updateUser(@RequestBody UserBO userBO);

    @DeleteMapping(URL_PREFIX + "/{id}")
    Result removeUserById(@PathVariable(name = "id") String id);


}
